package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.TravelComment;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.util.JsonResult;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface ITravelCommentService {
    /**
     * 获取评论消息
     * @param qo
     * @return
     */
    PageInfo query(QueryObject qo);

    /**
     * 获取未查看的评论条数
     * @param userId
     * @return
     */
    Integer queryForCount(Long userId);
    /**
     * 修改未查看条数为0
     * @param userId
     * @return
     */
    void updateState(Long userId);

    /**
     * 根据游记查出所有评论
     * @param travelId
     * @return
     */
    List<TravelComment> getCommentByTravelId(Long travelId);

    void saveTravelComment(TravelComment travelComment);

    List<TravelComment> getTravelCommentsByUserId(Long userId);
}
